<template>
  <div class="demo">
    <h3>学校名称：{{name}}</h3>
    <h3>学校地址：{{address}}</h3>
    <button @click="show">点我提示学校名称</button>
  </div>
</template>

<script>
//向外暴漏
export default {
  name: "School",
  data() {
    return {
      name: "尚硅谷",
      address: "北京"
    };
  },
  methods: {
    show() {
      alert(this.name)
    }
  }
};
</script>

<style>
.demo{
  background-color: aquamarine;
}
</style>
